package com.top4create.model;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.swing.text.Position;
import javax.xml.bind.annotation.XmlRootElement;

import com.top4create.face.FavourateCompany;
import com.top4create.face.SellInfo;


public class Company   implements Serializable {
    private Long id;
    private Type2 type2;
    private Type type;
    private Type3 type3;
    private String discription;
    private String email;
    private String fax;
    private String location;
    private String name;
    private String phone;
    private String productionTag;
    private String site;
    private Long userId;
    private Set<FavourateCompany> favourateCompanies = new HashSet<FavourateCompany>(0);
    private Set<Connecter> connecters = new HashSet<Connecter>(0);
    private Set<SellInfo> sellInfos = new HashSet<SellInfo>(0);
    private Set<Position> positions = new HashSet<Position>(0);
    private Set<Pictorial> pictorials = new HashSet<Pictorial>(0);
    private Set<BuyInfo> buyInfos = new HashSet<BuyInfo>(0);


    public Long getId() {
        return this.id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }

    public Type2 getType2() {
        return this.type2;
    }
    
    public void setType2(Type2 type2) {
        this.type2 = type2;
    }

    public Type getType() {
        return this.type;
    }
    
    public void setType(Type type) {
        this.type = type;
    }

    public Type3 getType3() {
        return this.type3;
    }
    
    public void setType3(Type3 type3) {
        this.type3 = type3;
    }
    

    public String getDiscription() {
        return this.discription;
    }
    
    public void setDiscription(String discription) {
        this.discription = discription;
    }
    

    public String getEmail() {
        return this.email;
    }
    
    public void setEmail(String email) {
        this.email = email;
    }

    public String getFax() {
        return this.fax;
    }
    
    public void setFax(String fax) {
        this.fax = fax;
    }
    

    public String getLocation() {
        return this.location;
    }
    
    public void setLocation(String location) {
        this.location = location;
    }
    

    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    

    public String getPhone() {
        return this.phone;
    }
    
    public void setPhone(String phone) {
        this.phone = phone;
    }
    

    public String getProductionTag() {
        return this.productionTag;
    }
    
    public void setProductionTag(String productionTag) {
        this.productionTag = productionTag;
    }
    

    public String getSite() {
        return this.site;
    }
    
    public void setSite(String site) {
        this.site = site;
    }
    

    public Long getUserId() {
        return this.userId;
    }
    
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Set<FavourateCompany> getFavourateCompanies() {
        return this.favourateCompanies;
    }
    
    public void setFavourateCompanies(Set<FavourateCompany> favourateCompanies) {
        this.favourateCompanies = favourateCompanies;
    }

    public Set<Connecter> getConnecters() {
        return this.connecters;
    }
    
    public void setConnecters(Set<Connecter> connecters) {
        this.connecters = connecters;
    }

    public Set<SellInfo> getSellInfos() {
        return this.sellInfos;
    }
    
    public void setSellInfos(Set<SellInfo> sellInfos) {
        this.sellInfos = sellInfos;
    }

    public Set<Position> getPositions() {
        return this.positions;
    }
    
    public void setPositions(Set<Position> positions) {
        this.positions = positions;
    }

    public Set<Pictorial> getPictorials() {
        return this.pictorials;
    }
    
    public void setPictorials(Set<Pictorial> pictorials) {
        this.pictorials = pictorials;
    }

    public Set<BuyInfo> getBuyInfos() {
        return this.buyInfos;
    }
    
    public void setBuyInfos(Set<BuyInfo> buyInfos) {
        this.buyInfos = buyInfos;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Company pojo = (Company) o;

        if (type2 != null ? !type2.equals(pojo.type2) : pojo.type2 != null) return false;
        if (type != null ? !type.equals(pojo.type) : pojo.type != null) return false;
        if (type3 != null ? !type3.equals(pojo.type3) : pojo.type3 != null) return false;
        if (discription != null ? !discription.equals(pojo.discription) : pojo.discription != null) return false;
        if (email != null ? !email.equals(pojo.email) : pojo.email != null) return false;
        if (fax != null ? !fax.equals(pojo.fax) : pojo.fax != null) return false;
        if (location != null ? !location.equals(pojo.location) : pojo.location != null) return false;
        if (name != null ? !name.equals(pojo.name) : pojo.name != null) return false;
        if (phone != null ? !phone.equals(pojo.phone) : pojo.phone != null) return false;
        if (productionTag != null ? !productionTag.equals(pojo.productionTag) : pojo.productionTag != null) return false;
        if (site != null ? !site.equals(pojo.site) : pojo.site != null) return false;
        if (userId != null ? !userId.equals(pojo.userId) : pojo.userId != null) return false;

        return true;
    }

    public int hashCode() {
        int result = 0;
        result = (type2 != null ? type2.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (type3 != null ? type3.hashCode() : 0);
        result = 31 * result + (discription != null ? discription.hashCode() : 0);
        result = 31 * result + (email != null ? email.hashCode() : 0);
        result = 31 * result + (fax != null ? fax.hashCode() : 0);
        result = 31 * result + (location != null ? location.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + (productionTag != null ? productionTag.hashCode() : 0);
        result = 31 * result + (site != null ? site.hashCode() : 0);
        result = 31 * result + (userId != null ? userId.hashCode() : 0);

        return result;
    }

    public String toString() {
        StringBuffer sb = new StringBuffer(getClass().getSimpleName());

        sb.append(" [");
        sb.append("id").append("='").append(getId()).append("', ");
        sb.append("type2").append("='").append(getType2()).append("', ");
        sb.append("type").append("='").append(getType()).append("', ");
        sb.append("type3").append("='").append(getType3()).append("', ");
        sb.append("discription").append("='").append(getDiscription()).append("', ");
        sb.append("email").append("='").append(getEmail()).append("', ");
        sb.append("fax").append("='").append(getFax()).append("', ");
        sb.append("location").append("='").append(getLocation()).append("', ");
        sb.append("name").append("='").append(getName()).append("', ");
        sb.append("phone").append("='").append(getPhone()).append("', ");
        sb.append("productionTag").append("='").append(getProductionTag()).append("', ");
        sb.append("site").append("='").append(getSite()).append("', ");
        sb.append("userId").append("='").append(getUserId()).append("', ");
        
        
        
        
        
        
        sb.append("]");
      
        return sb.toString();
    }

}
